Optimal. Leaf size=29 \[ -\frac {b \log (a+b \cot (x))}{a^2}-\frac {b \log (\tan (x))}{a^2}+\frac {\tan (x)}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3597, 46}
\begin {gather*} -\frac {b \log (\tan (x))}{a^2}-\frac {b \log (a+b \cot (x))}{a^2}+\frac {\tan (x)}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 3597
Rubi steps
\begin {align*} \int \frac {\sec ^2(x)}{a+b \cot (x)} \, dx &=-\left (b \text {Subst}\left (\int \frac {1}{x^2 (a+x)} \, dx,x,b \cot (x)\right )\right )\\ &=-\left (b \text {Subst}\left (\int \left (\frac {1}{a x^2}-\frac {1}{a^2 x}+\frac {1}{a^2 (a+x)}\right ) \, dx,x,b \cot (x)\right )\right )\\ &=-\frac {b \log (a+b \cot (x))}{a^2}-\frac {b \log (\tan (x))}{a^2}+\frac {\tan (x)}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 27, normalized size = 0.93 \begin {gather*} \frac {b \log (\cos (x))-b \log (b \cos (x)+a \sin (x))+a \tan (x)}{a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.29, size = 21, normalized size = 0.72
method | result | size |
default | \(\frac {\tan \left (x \right )}{a}-\frac {b \ln \left (a \tan \left (x \right )+b \right )}{a^{2}}\) | \(21\) |
risch | \(\frac {2 i}{a \left ({\mathrm e}^{2 i x}+1\right )}+\frac {b \ln \left ({\mathrm e}^{2 i x}+1\right )}{a^{2}}-\frac {b \ln \left ({\mathrm e}^{2 i x}+\frac {i b -a}{i b +a}\right )}{a^{2}}\) | \(60\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 20, normalized size = 0.69 \begin {gather*} -\frac {b \log \left (a \tan \left (x\right ) + b\right )}{a^{2}} + \frac {\tan \left (x\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.13, size = 57, normalized size = 1.97 \begin {gather*} -\frac {b \cos \left (x\right ) \log \left (2 \, a b \cos \left (x\right ) \sin \left (x\right ) - {\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + a^{2}\right ) - b \cos \left (x\right ) \log \left (\cos \left (x\right )^{2}\right ) - 2 \, a \sin \left (x\right )}{2 \, a^{2} \cos \left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{2}{\left (x \right )}}{a + b \cot {\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 21, normalized size = 0.72 \begin {gather*} -\frac {b \log \left ({\left | a \tan \left (x\right ) + b \right |}\right )}{a^{2}} + \frac {\tan \left (x\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.20, size = 20, normalized size = 0.69 \begin {gather*} \frac {\mathrm {tan}\left (x\right )}{a}-\frac {b\,\ln \left (b+a\,\mathrm {tan}\left (x\right )\right )}{a^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________